package com.ruoyi.stuinfo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stuinfo.mapper.NotificationMapper;
import com.ruoyi.stuinfo.domain.Notification;
import com.ruoyi.stuinfo.service.INotificationService;

/**
 * 通知详情Service业务层处理
 * 
 * @author zc
 * @date 2025-05-15
 */
@Service
public class NotificationServiceImpl implements INotificationService 
{
    @Autowired
    private NotificationMapper notificationMapper;

    /**
     * 查询通知详情
     * 
     * @param notificationId 通知详情主键
     * @return 通知详情
     */
    @Override
    public Notification selectNotificationByNotificationId(Long notificationId)
    {
        return notificationMapper.selectNotificationByNotificationId(notificationId);
    }

    /**
     * 查询通知详情列表
     * 
     * @param notification 通知详情
     * @return 通知详情
     */
    @Override
    public List<Notification> selectNotificationList(Notification notification)
    {
        return notificationMapper.selectNotificationList(notification);
    }

    /**
     * 新增通知详情
     * 
     * @param notification 通知详情
     * @return 结果
     */
    @Override
    public int insertNotification(Notification notification)
    {
        notification.setCreateTime(DateUtils.getNowDate());
        return notificationMapper.insertNotification(notification);
    }

    /**
     * 修改通知详情
     * 
     * @param notification 通知详情
     * @return 结果
     */
    @Override
    public int updateNotification(Notification notification)
    {
        return notificationMapper.updateNotification(notification);
    }

    /**
     * 批量删除通知详情
     * 
     * @param notificationIds 需要删除的通知详情主键
     * @return 结果
     */
    @Override
    public int deleteNotificationByNotificationIds(Long[] notificationIds)
    {
        return notificationMapper.deleteNotificationByNotificationIds(notificationIds);
    }

    /**
     * 删除通知详情信息
     * 
     * @param notificationId 通知详情主键
     * @return 结果
     */
    @Override
    public int deleteNotificationByNotificationId(Long notificationId)
    {
        return notificationMapper.deleteNotificationByNotificationId(notificationId);
    }
}
